﻿// Decompiled with JetBrains decompiler
// Type: MCM.Abstractions.MemorySettingsPreset
// Assembly: MCMv5, Version=5.10.2.0, Culture=neutral, PublicKeyToken=null
// MVID: 7AB326B9-B2B4-41C2-9177-68E944071101
// Assembly location: D:\steam\steamapps\workshop\content\261550\2859238197\bin\Win64_Shipping_Client\MCMv5.dll

using MCM.Abstractions.Base;
using System;

#nullable enable
namespace MCM.Abstractions
{
  public sealed class MemorySettingsPreset : ISettingsPreset
  {
    private readonly Func<BaseSettings> _template;

    public string SettingsId { get; }

    public string Id { get; }

    public string Name { get; }

    public MemorySettingsPreset(
      string settingId,
      string id,
      string name,
      Func<BaseSettings> template)
    {
      this.SettingsId = settingId;
      this.Id = id;
      this.Name = name;
      this._template = template;
    }

    public BaseSettings LoadPreset() => this._template();

    public bool SavePreset(BaseSettings settings) => true;
  }
}
